//placa.js
function Placa(file,pontos)
{
this.img = new Image();
this.img.src=file;
this.loaded = false;
this.visible = true;

this.img.onload = function()
{
loaded = true; 
console.log("carregamento pela classe placa " + loaded);
};

   this.size_x = 100;
   this.size_y = 100;
   this.position_x = Math.floor((Math.random()*(SCREEN_WIDTH-this.size_x))); 
   this.position_y = Math.floor((Math.random()*(SCREEN_SCREENHEIGHT-this.size_y)));
   this.velocity_x = 0;
   this.velocity_y = Math.floor((Math.random()*10)+1);
   
   this.velocity_MAX = 15;
   
   this.update=function()
   {
   	
   	this.position_x += this.velocity_x;	

   	this.position_y += this.velocity_y;	
   	
   	
   	
   	
   };//fecha update
   
   this.reset=function()
   {   
		this.position_y = 0;//Math.floor((Math.random()*(SCREEN_WIDTH-this.size_x)));;
		this.position_x = Math.floor((Math.random()*(SCREEN_WIDTH-this.size_x))); 
		this.velocity_y = Math.floor((Math.random()*10)+1);
   	
   }

}